{%include file="index.header.tpl.php" %}
{%include file="index.left.tpl.php"%}
 <!--主要内容开始-->
  <div class="content-wrapper">
    <section class="content">
      <div class="row">
        <section class="col-lg-12 connectedSortable">
         <div class="box box-default box-solid">
             <form action="" method="post">	
                <div class="box-header with-border">
                    <span class="fa fa-table" style="float:left; font-size:18px; padding-top:3px; color:#3c8dbc;" ></span>
                    <p class="box-title">学校每周工作安排</p>
                </div>
                <div class="box-body">
				   <div class="form-group">
                            <label  class="col-sm-1 control-label" style="width:70px;" >周次:</label>
                            <div class="col-sm-1">
                               <input type="text" id="plan_week"  name="plan_week" >
                             </div>
                   </div>
                   <div style="height:16px; clear:both;"></div>
                     <table class="table table-bordered table-striped"  id="mytable">
                                <thead>
                                    <tr style="background-color:#5fb2dc">
                                        <td width="80">星期</td>
                                        <td style="width:12%">日期</td>
										<td>主要内容</td>
										<td style="width:34%;">负责部门</td>
										<td>备注</td> 										
                                    </tr>	
                                </thead>
                                <tbody>
                                    <tr>
                                        <td>星期一</td>
                                        <td><input type="text" style="width:100%" class="day1" id="time" name="start_time"></td>
										<td><textarea rows="2" style="width:100%" name="plan_content_1"></textarea></td>
										<td>
                                           {%foreach from=$department_lists key=key item=value%}
												<label> <input type="checkbox" name="department_id_1[]" value="{%$value.department_id%}"> {%$value.department_name%}</label>
										  {%/foreach%}
										  <label>其他：<input type="text" value="" name="plan_rests_1"></label>
										</td>
										<td><textarea rows="2" style="width:100%" name="plan_remark_1"></textarea></td>
                                    </tr>	
                                     <tr>
                                        <td>星期二</td>
                                        <td></td>
										<td><textarea rows="2" style="width:100%" name="plan_content_2"></textarea></td>
										<td>
                                           {%foreach from=$department_lists key=key item=value%}
												<label> <input type="checkbox" name="department_id_2[]" value="{%$value.department_id%}"> {%$value.department_name%}</label>
										  {%/foreach%}
										  <label>其他：<input type="text" value="" name="plan_rests_2"></label>
										</td>
										<td><textarea rows="2" style="width:100%" name="plan_remark_2"></textarea></td>
                                    </tr>	
                                	<tr>
                                        <td>星期三</td>
                                        <td></td>
										<td><textarea rows="2" style="width:100%" name="plan_content_3"></textarea></td>
										<td>
                                           {%foreach from=$department_lists key=key item=value%}
												<label> <input type="checkbox" name="department_id_3[]" value="{%$value.department_id%}"> {%$value.department_name%}</label>
										  {%/foreach%}
										  <label>其他：<input type="text" value="" name="plan_rests_3"></label>
										</td>
										<td><textarea rows="2" style="width:100%" name="plan_remark_3"></textarea></td>
                                    </tr>	
                                     <tr>
                                        <td>星期四</td>
                                        <td></td>
										<td><textarea rows="2" style="width:100%" name="plan_content_4"></textarea></td>
										<td>
                                           {%foreach from=$department_lists key=key item=value%}
												<label> <input type="checkbox" name="department_id_4[]" value="{%$value.department_id%}"> {%$value.department_name%}</label>
										  {%/foreach%}
										  <label>其他：<input type="text" value="" name="plan_rests_4"></label>
										</td>
										<td><textarea rows="2" style="width:100%" name="plan_remark_4"></textarea></td>
                                    </tr>
                                    <tr>
                                        <td>星期五</td>
                                        <td></td>
										<td><textarea rows="2" style="width:100%" name="plan_content_5"></textarea></td>
										<td>
                                           {%foreach from=$department_lists key=key item=value%}
												<label> <input type="checkbox" name="department_id_5[]" value="{%$value.department_id%}"> {%$value.department_name%}</label>
										  {%/foreach%}
										  <label>其他：<input type="text" value="" name="plan_rests_5"></label>
										</td>
										<td><textarea rows="2" style="width:100%" name="plan_remark_5"></textarea></td>
                                    </tr>	
                                     <tr>
                                        <td>星期六</td>
                                        <td></td>
										<td><textarea rows="2" style="width:100%" name="plan_content_6"></textarea></td>
										<td>
                                           {%foreach from=$department_lists key=key item=value%}
												<label> <input type="checkbox" name="department_id_6[]" value="{%$value.department_id%}"> {%$value.department_name%}</label>
										  {%/foreach%}
										  <label>其他：<input type="text" value="" name="plan_rests_6"></label>
										</td>
										<td><textarea rows="2" style="width:100%" name="plan_remark_6"></textarea></td>
                                    </tr>
                                    <tr>
                                        <td>星期日</td>
                                        <td></td>
										<td><textarea rows="2" style="width:100%" name="plan_content_7"></textarea></td>
										<td>
                                           {%foreach from=$department_lists key=key item=value%}
												<label> <input type="checkbox" name="department_id_7[]" value="{%$value.department_id%}"> {%$value.department_name%}</label>
										  {%/foreach%}
										  <label>其他：<input type="text" value="" name="plan_rests_7"></label>
										</td>
										<td><textarea rows="2" style="width:100%" name="plan_remark_7"></textarea></td>
                                    </tr>
                            </tbody>
                        </table>
				   </div><!--box-body -->
                   <div class="box-footer text-center">
                         <button type="submit" class="btn btn-primary">确 定</button>
                   </div>
               </form>
           </div><!--box box-default box-solid-->
        </section>   
        </div><!--row-->
    </section>
 </div>
  <!--主要内容结束-->
{% include file="index.footer.tpl.php" %}
<script>
  $(function() {
    $( ".day1" ).datepicker({
      changeMonth: true,
	  changeYear: true,
    });

      $("#mytable").click(function () {
              var week = $("#plan_week").val();
              $.post("index.php?a=arrange.weekjson",{week:week},function(msg){
                  $("#time").val(msg);
              })
      }
      )

  });
  </script>
<
 

